# err_raise.py
class FooError(ValueError):
    pass

def foo(s):
    if s==0:
        raise FooError('invalid value: %s' % s)
    return 10 / s

print(foo(0))

